package com.imachen.feign;

import com.imachen.domain.PurchaseApply;
import com.imachen.result.JSONResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@FeignClient(value = "service-purchase" )
public interface PurchaseService {

    @RequestMapping(value="/purchaseApply/save",method= RequestMethod.POST)
    JSONResult saveOrUpdate(@RequestBody PurchaseApply purchaseApply);

    @RequestMapping(value = "/purchaseApply/approval/{applyId}/{status}",method = RequestMethod.GET)
    JSONResult approval(@PathVariable("applyId") Long applyId, @PathVariable("status")Integer status);

    @RequestMapping(value = "/purchaseApply/{id}",method = RequestMethod.GET)
    JSONResult get(@PathVariable("id")Long id);


}
